In digital image processing, different kinds of filters are widely used for noise reduction and enhancement, etc. Usually, filter is of fixed window size, such as 5×5, 9×9 or 15×15, etc. The realization of a fixed window size is easy, but when an object boundary is met, the fixed window size will contain all pixels of two or more different objects, which results in that a filtering result is undesired.
In order to solve this problem, one method is to perform edge detection to an image first, and then determine a filtering window of a filter by using the result of the edge detection. However, the method needs to be carried out in two paths, which results in relatively long time delay, and is not well suitable for some applications having a strict requirement on time delay.
It should be noted that the above description of the background art is merely provided for clear and complete explanation of the present invention and for easy understanding by those skilled in the art. And it should not be understood that the above technical solution is known to those skilled in the art as it is described in the background art of the present invention.